package com.atguigu.gulimall.gulimallproduct;

import org.mybatis.spring.annotation.MapperScan;
import org.mybatis.spring.annotation.MapperScans;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

/**
 * @Author: Zjn ; Bring it on !!!
 * @Date: 2021/9/13 0013 19:53
 * Note:
 * 测试使用缓存
 * @Cacheable: Triggers cache population. 触发将数据保存到缓存的操作
 *
 * @CacheEvict: Triggers cache eviction. 触发将数据从缓存删除的操作
 *
 * @CachePut: Updates the cache without interfering with the method execution. 不影响方法执行更新缓存
 *
 * @Caching: Regroups multiple cache operations to be applied on a method.  组合以上多个操作
 *
 * @CacheConfig: Shares some common cache-related settings at class-level.  在类级别共享缓存的相同配置
 *
 * 原理：
 *      CacheAutoConfiguration -> RedisCacheConfiguration
 */
@EnableRedisHttpSession
@EnableCaching
@EnableFeignClients(basePackages = "com.atguigu.gulimall.gulimallproduct.feign")
@EnableDiscoveryClient
@SpringBootApplication
public class GulimallProductApplication {
    public static void main(String[] args) {
        SpringApplication.run(GulimallProductApplication.class,args);
    }
}
